package com.camera.road.util;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Timer;

public class MessageConsole {

	private static Element message = DOM.getElementById("message");
	
	private static Timer clearTimer; 

	public static void setText(String text){
		DOM.setInnerText(message, text);
		startTimer();
	}
	
	public static void startTimer(){
		if(clearTimer != null) clearTimer.cancel();
		clearTimer = new Timer(){
			public void run() {
				setText("");;
			}
		};
		clearTimer.schedule(20000);
	}
	
}
